package MyFront.Controller;

import MyFramePro.Domain.ResponseResult;
import MyFramePro.Service.Impl.UploadServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RestController
public class UploadController {

    @Resource
    private UploadServiceImpl uploadService;

    /**
     * 这里是文件上传的功能
     */
    @PostMapping(value = "/upload")
    public ResponseResult uploadImg(MultipartFile img){

        return uploadService.uploadImg(img);
    }

}
